30. UPDATE

Update (1)

Practice Update - Question 1

QUESTION:

A knowledgable vet identified that Tommy is not just a Pomeranian, but a "Pomeranian Terrier" mix.

Write the SQL statement that would update his breed to be correct.

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer

Practice Update - Question 2

QUESTION:

The scale in the shelter is discovered to be broken. To mark all of the pets that need to be re-weighed, the shelter wants to set all of the pets' weights to 0 and update them one at a time.

Write the code which would set all of the pets' weights to 0.

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer

Practice Update - Question 2/2

QUESTION:

The scale in the shelter is discovered to be broken. To mark all of the pets that need to be re-weighed, the shelter wants to set all of the pets' weights to 0 and update them one at a time.

Write the code which would set all of the pets' weights to 0.

ANSWER:

UPDATE pets SET weight = 0;

Current pets table setup: